﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmBuscarProveedor.aspx.cs" Inherits="Farmacia.net.Compras.Proveedor.frmBuscarProveedor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Buscar Proveedor</h2>

<fieldset>
    <legend>Proveedor</legend>
    <asp:Label ID="Label1" runat="server" Text="Ingrese Ruc:"></asp:Label>
    <asp:TextBox ID="txtRuc" runat="server"></asp:TextBox>
    <asp:Button ID="btnBuscar" runat="server" Text="Buscar" />

</fieldset>
    <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" 
        GridLines="None" DataSourceID="odsProveedor" AutoGenerateColumns="False" 
        Width="845px">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="IdProveedor" HeaderText="IdProveedor" 
                SortExpression="IdProveedor" />
            <asp:BoundField DataField="Ruc" HeaderText="Ruc" SortExpression="Ruc" />
            <asp:BoundField DataField="RazonSocial" HeaderText="RazonSocial" 
                SortExpression="RazonSocial" />
            <asp:BoundField DataField="Direccion" HeaderText="Direccion" 
                SortExpression="Direccion" />
            <asp:BoundField DataField="Telefono" HeaderText="Telefono" 
                SortExpression="Telefono" />
            <asp:BoundField DataField="PersonaContacto" HeaderText="PersonaContacto" 
                SortExpression="PersonaContacto" />
            <asp:BoundField DataField="Ciudad" HeaderText="Ciudad" 
                SortExpression="Ciudad" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="Movil" HeaderText="Movil" SortExpression="Movil" />
            <asp:HyperLinkField DataNavigateUrlFields="idProveedor" 
                DataNavigateUrlFormatString="frmRegistrarProveedor.aspx?acc=editar&amp;idProveedor={0}" 
                HeaderText="Editar" Text="Editar" />
            <asp:HyperLinkField DataNavigateUrlFields="idProveedor" 
                
                DataNavigateUrlFormatString="frmRegistrarProveedor.aspx?acc=eliminar&amp;idProveedor={0}" 
                HeaderText="Eliminar" Text="Eliminar" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:ObjectDataSource ID="odsProveedor" runat="server" 
        SelectMethod="GetFromProveedorByRuc" 
        TypeName="Farmacia.BussinessLogic.ProveedorBL" 
        onobjectcreating="odsProveedor_ObjectCreating">
        <SelectParameters>
            <asp:ControlParameter ControlID="txtRuc" DefaultValue="%" Name="ruc" 
                PropertyName="Text" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>

</asp:Content>
